<template>
  <BoTable :request="fetchList" :columns="columns" show-index>
    <template #toolbars>
      <Button>新增</Button>
    </template>
  </BoTable>
</template>

<route lang="json">
{
  "meta": {
    "title": "BIM集成管理"
  }
}
</route>
<script setup lang="tsx">
import { computed } from 'vue';
import { BoTable, BoTableProps } from '@boeyo/ui';
import { Button } from 'ant-design-vue';
import { fetchList } from './api';

const columns = computed<BoTableProps['columns']>(() => {
  return [
    {
      title: '名称',
      dataIndex: 'name',
    },
    {
      title: '集成时间',
      dataIndex: 'createTime',
    },
    {
      title: '集成类型',
      dataIndex: 'type',
    },
    {
      title: '集成状态',
      dataIndex: 'status',
    },
    {
      title: '是否为主模型',
      dataIndex: 'isMaster',
    },
    {
      title: '操作',
      actions(opt) {
        return [
          {
            text: '预览',
            onClick(record) {
              console.log('预览');
            },
          },
        ];
      },
    },
  ];
});
</script>
